package com.cw2.structural.adapter.clazz;

import com.cw2.structural.adapter.Player;
import com.cw2.structural.adapter.Zh_JPTranslator;

/**
 * 集成的方式：类结构模型,适配转换到了翻译器的功能上
 */
public class JPMoviePlayerAdapter extends Zh_JPTranslator implements Player {

    private Player player;
    public JPMoviePlayerAdapter(Player player) {
        this.player = player;
    }

    @Override
    public String play() {
        String context = player.play();
        String translate = translate(context);
        System.out.println("日文是撒" + translate);
        return context;
    }
}
